	<br/>
    <b><?php echo CHtml::encode($data->getAttributeLabel('locality_id')); ?>:</b>
	<?php echo CHtml::encode($data->getlocality()); ?>
	<br />

	<b><?php echo CHtml::encode($data->getAttributeLabel('services')); ?>:</b>
	<?php echo CHtml::encode($data->services); ?>
	<br />

	<b><?php echo CHtml::encode($data->getAttributeLabel('price')); ?>:</b>
	<?php echo CHtml::encode($data->price); ?>
	<br />
	<br />
    <? if(Photo::model()->findAllByAttributes(array("hotel_id"=>$data->id))): ?>
    <h1>Фотографии</h1>

    <script type="text/javascript">
    /* <![CDATA[ */
        jQuery.noConflict();
        var myMooFlowPage = {

            start: function(){

                var div = new Element('div').inject($('album_content'), 'bottom');
                var mf = new MooFlow(div, {
                    startIndex: 0,
                    offsetY: 0,
                    useCaption: false,
                    useMouseWheel: true,
                    useKeyInput: true,
                    useViewer: true,
                    bgColor: 'white',
                    onEmptyinit: function(){
                        this.loadJSON('<?php echo Yii::app()->createURL('photo/hoteljson', array('hotel_id'=>$data->id,));?>');
                    },
                    onClickView: function(obj){
                        var a = new Element('a',{
                            'class':'remooz-element',
                            'href':obj.href,
                            'title':obj.title + ' - '+ obj.alt,
                            'styles':{'border':'none'}
                        });
                        var img = new Element('img',{
                            'src':obj.src,
                            'title':obj.title,
                            'alt':obj.alt,
                            'styles':obj.coords
                        }).setStyles({
                            'position':'absolute',
                            'border':'none'
                        }).inject(a);
                        a.inject(document.body);
                        var remooz = new ReMooz(a, {
                            //centered: true,
                            //resizeFactor: 0.8,
                            //origin: img,

                            origin: img,
                            shadow: 'onOpen', // fx is faster because shadow appears after resize animation
                            resizeFactor: 0.8, // resize to maximum 80% of screen size
                            cutOut: false, // don't hide the original
                            opacityResize: 0.4, // opaque resize
                            dragging: false, // disable dragging
                            centered: true,
                            onCloseEnd: function(){
                                a.destroy();
                                delete remooz;
                            }
                        }).open();
                    }
                });

            }

        };

        window.addEvent('domready', myMooFlowPage.start);

    /* ]]> */
    </script>

    <div id="album_content" style="width: 600px; margin: 0 auto">

    </div>
    <? endif; ?>

    <div id="comments">

        <h1>Комментарии</h1>
        <?php

        $this->widget('zii.widgets.CListView', array(
            'dataProvider'=>$comment_model->searchForHotel($data->id),
            'itemView'=>'../comment/_view',
        )); ?><br/>
  
        <?php echo $this->renderPartial('../comment/_form', array('model'=> $comment_model, 'hotel_id'=>$data->id)); ?>
    </div>
